package com.hq.base.properties;


import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;


/**
* @author: lujie
* @create: 2021/4/14
* @description: 应用配置类
**/

@Component
@ConfigurationProperties(prefix = "application")
@Data
public class ApplicationProperties implements InitializingBean {

    private String appid;
    private String newsapi;


    public  static String APPID;
    public  static String NEWS_API;


    @Override
    public void afterPropertiesSet() throws Exception {
        APPID = this.appid;
        NEWS_API = this.newsapi;
    }
}
